import sys, shutil, os, string, filecmp ;
def copyFile(f1,f2):
	f3 = f2+'/'+os.path.basename(f1)
	cant = False
	if os.path.exists(f3):
		cant = filecmp.cmp(f1, f3);
	if not cant:
		shutil.copy(f1,f2)
#		shutil.copy(f3,"./")
		print 'copy:'+f1

copyFile("./CCLabel.cpp", "../cocos/2d/");
copyFile("./UIWidget.cpp", "../cocos/ui/");

copyFile("./CCParticleSystemQuad.cpp", "../cocos/2d/");
copyFile("./CCSkin.cpp", "../cocos/editor-support/cocostudio/");
copyFile("./CCBillBoard.cpp", "../cocos/3d/");
copyFile("./CCAtlasNode.cpp", "../cocos/2d/");
copyFile("./CCSpriteBatchNode.cpp", "../cocos/2d/");
copyFile("./CCSprite.cpp", "../cocos/2d/");
copyFile("./CCGLProgram.h", "../cocos/renderer/");
copyFile("./CCGLProgram.cpp", "../cocos/renderer/");
copyFile("./CCTexture2D.h", "../cocos/renderer/");
copyFile("./CCTexture2D.cpp", "../cocos/renderer/");
copyFile("./CCQuadCommand.h", "../cocos/renderer/");
copyFile("./CCQuadCommand.cpp", "../cocos/renderer/");
copyFile("./CCBatchCommand.h", "../cocos/renderer/");
copyFile("./CCBatchCommand.cpp", "../cocos/renderer/");
copyFile("./CCTrianglesCommand.h", "../cocos/renderer/");
copyFile("./CCTrianglesCommand.cpp", "../cocos/renderer/");
copyFile("./ccShader_PositionTextureColor_noMVP.frag", "../cocos/renderer/");
copyFile("./ccShader_PositionTextureColor.frag", "../cocos/renderer/");
copyFile("./ccShader_PositionTextureColorAlphaTest.frag", "../cocos/renderer/");
copyFile("./ccShader_UI_Gray.frag", "../cocos/renderer/");
copyFile("./CCImage.frag", "../cocos/platform/");

print("Copy Successed");
#windows
os.system('pause') 
